package org.adorsys.aderp.orga.repository;

import java.util.List;

import org.adorsys.aderp.orga.domain.EmailAddressRole;
import org.adorsys.aderp.orga.domain.OrgaPerson;
import org.adorsys.aderp.orga.domain.PersonEmail;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.roo.addon.layers.repository.jpa.RooJpaRepository;

@RooJpaRepository(domainType = PersonEmail.class)
public interface PersonEmailRepository {
	List<PersonEmail> findByOrgaPerson(OrgaPerson orgaPerson);
	Page<PersonEmail> findByOrgaPerson(OrgaPerson orgaPerson, Pageable pageable);
	Page<PersonEmail> findByOrgaPersonAndAddressRole(OrgaPerson orgaPerson, EmailAddressRole addressRole, Pageable pageable);
	Page<PersonEmail> findByAddressRole(EmailAddressRole addressRole, Pageable pageable);
}
